package com.buer.storage.business.dao;


import com.buer.storage.business.domain.Aorderdetails;
import com.buer.storage.business.domain.Stock;
import com.buer.storage.business.dto.AorderDto;
import com.buer.storage.business.dto.AorderSelectDto;
import com.buer.storage.business.dto.AorderStorageDto;
import com.buer.storage.business.dto.AorderdetailsDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface AorderDao {
    //订单入库
    int insertAorder(AorderStorageDto aorderStorageDto);

    //商品入库
    int insertAorderdetails(@Param(value = "arrary") Aorderdetails[] aorderPutProds);

    //查询调拨表
    List<AorderSelectDto> findAorderAll(Integer allotId);

     //根据调拨表ID查询调拨详情信息
    List<AorderdetailsDto> findAorderdetailsAllById(Integer allotId);

    //查询调拨信息表
    List<AorderDto> findAorder();

    //根据调拨表id删除调拨信息
    int deleteAorderById(int allotId);


    void deleteAorderByPutId(Integer allotId);

    void deleteAorderDetailsByPutId(Integer allotId);



    AorderdetailsDto[] findAordertailsAll(Integer allotId);

    int deleteStock(int stockId);

    Stock queryBuerStockByParam(AorderdetailsDto putProd);

    int updateAddSumStock(Stock stock);


    int updateAorderStatus(Integer allotId);
}
